//
//  SetionAlertController.swift
//  cysLibrarySys
//
//  Created by 曹亚索 on 2021/7/6.
//

import UIKit

class AlertController: UIAlertController {
    
    private var setions : [String] = ["修改资料","修改密码","注销账号","取消"]
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setUpAlert()
        
        // Do any additional setup after loading the view.
    }
    private func setUpAlert(){
        
        self.addAction(UIAlertAction(title: setions[0], style: .default, handler: { (editInfo) in
            print("编辑资料")
        }))
        self.addAction(UIAlertAction(title: setions[1], style: .default, handler: { (editPassword) in
            print("编辑密码")
        }))
        self.addAction(UIAlertAction(title: setions[2], style: .destructive, handler: { (deleteUser) in
            print("注销账号")
        }))
        self.addAction(UIAlertAction(title: setions[3], style: .cancel, handler: nil))
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
